package com.wngbms;

import java.io.*;
import java.net.Socket;

public class TCPClient {

    public static void main(String[] args) throws IOException {

        Socket client = new Socket("192.168.75.110", 8888);
        client.setSendBufferSize(20);
        client.setTcpNoDelay(true);

        OutputStream outputStream = client.getOutputStream();

        InputStream in = System.in;
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));

        while (true) {
            String line = reader.readLine();
            if (line != null) {
                byte[] bb = line.getBytes();
                for (byte b : bb) {
                    outputStream.write(b);
                }
            }
        }
    }

}
